HAL I2C state and error functions migration

This section provides information about the HAL I2C state and error functions migration.

HAL I2C get state et get mode

Note

The functions HAL_I2C_GetState() and HAL_I2C_GetMode() remain unchanged.

Description

HAL1

HAL2

Retrieve the current state of the I2C

HAL_I2C_GetState(const I2C_HandleTypeDef *hi2c)

HAL_I2C_GetState(const hal_i2c_handle_t *hi2c)

Returns a value representing the current mode

HAL_I2C_GetMode(const I2C_HandleTypeDef *hi2c)

HAL_I2C_GetMode(const hal_i2c_handle_t *hi2c)


HAL I2C get error

HAL1

HAL2

HAL_I2C_GetError
HAL_I2C_GetLastErrorCodes

Related concept: Revised and optimized HAL error management